﻿using System.Net.Sockets;

namespace CleverDD.Helper.Tool
{
    public class WebTool
    {
        public bool TestPort(string ip, int port)
        {
            try
            {
                using (TcpClient client = new TcpClient())
                {
                    client.Connect(ip, port);
                    return true;
                }
            }
            catch (SocketException)
            {
                return false;
            }
        }
    }
}